using System;

namespace IBNet
{
   /// <summary>
   /// Next Valid Id Event Arguments
   /// </summary>
   public class NextValidIdEventArgs : EventArgs
   {
      private readonly int orderId;

      /// <summary>
      /// Creates a new NextValidIdEventArgs.
      /// </summary>
      /// <param name="orderId">The next available order Id received from TWS upon connection.</param>
      public NextValidIdEventArgs(int orderId)
      {
         this.orderId = orderId;
      }

      /// <summary>
      /// Gets the order Id.
      /// </summary>
      public int OrderId
      {
         get { return orderId; }
      }
   }
}